<%@ page language="java"  pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!doctype html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1" />
    <title>约来约美 </title>
    
    <link rel="stylesheet" href="${static_host}style/userct_base.css" />
    <script src="${static_host}script/jquery-1.11.1.min.js"></script>
    <script src="${static_host}script/userct_order.js"></script>
</head>
<body>
<div class="page">
  <div class="header">
    <h1 class="hd-title">我的订单</h1>
    <a href="user!index.do" class="pos-l icon hd-return">返回</a>
    <a href="javascript:location.reload(true);" class="pos-r"></a>
  </div>

  <div class="content">
    
    <ul class="cate grid4">
    <li value="1"><a href="centent!orderlist.do">全部订单</a></li>
    <li value="2"><a href="centent!orderlist.do?t=2">未消费</a></li>
    <li value="3"><a href="centent!orderlist.do?t=3">已消费</a></li>
    <li value="4"><a href="centent!orderlist.do?t=4">未评价</a></li>
    </ul>
    
    <ul class="orders">
        <s:if test="#request.list.size==0">
		 <li  style="text-align: center;font-size: 15px; color: #CCC; padding-top: 30px">暂无订单信息</li>
        </s:if>
    <s:iterator value="#request.list">
     <li>
      <a href="centent!orderdetail.do?id=${order_id}&flag=1">
      <img src="${itemimg}" />
      <div>
      <p class="name">${item_name}</p>
      <p class="price">价格：${price} 元</p>
      <p class="shop">店铺：${store_name}</p>
      <p class="state">状态：
      <s:if test="state==2">已支付</s:if>
       <s:if test="state==3">已消费</s:if>
        <s:if test="state==5">线下支付</s:if>
         <s:if test="state==4">退款中</s:if>
          <s:if test="state==6">订单已取消 </s:if>
      </p>
      </div>
            <s:if test="state==3 && comment==1 ">
                  <a href="centent!comment.do?id=${order_id}" class="btn">去评论</a>
            </s:if>

      </a>
    </li>
    
    </s:iterator>
    
    <!-- 
    <li>
      <a href="order_detail4.html">
      <img src="../image/svc02.jpg" />
      <div>
      <p class="name">服务名称</p>
      <p class="price">价格：600 元</p>
      <p class="shop">店铺：时尚来袭</p>
      <p class="state">状态：已完成</p>
      </div>
      </a>
    </li>
    <li>
      <a href="order_detail2.html">
      <img src="../image/svc03.jpg" />
      <div>
      <p class="name">服务名称</p>
      <p class="price">价格：600 元</p>
      <p class="shop">店铺：时尚来袭</p>
      <p class="state">状态：已支付等待消费</p>
      </div>
      </a>
    </li>
   
    <li>
      <a href="order_detail1.html">
      <img src="../image/svc03.jpg" />
      <div>
      <p class="name">服务名称</p>
      <p class="price">价格：600 元</p>
      <p class="shop">店铺：时尚来袭</p>
      <p class="state">状态：未支付</p>
      </div>
      <a href="../order_payment.html" class="btn">去支付</a>
      </a>
    </li>
    <li>
      <a href="order_detail3.html">
      <img src="../image/svc01.jpg" />
      <div>
      <p class="name">服务名称</p>
      <p class="price">价格：600 元</p>
      <p class="shop">店铺：时尚来袭</p>
      <p class="state">状态：消费成功</p>
      </div>
      <a href="../comment.html" class="btn">去评价</a>
      </a>
    </li>
    <li>
      <a href="order_detail4.html">
      <img src="../image/svc02.jpg" />
      <div>
      <p class="name">服务名称</p>
      <p class="price">价格：600 元</p>
      <p class="shop">店铺：时尚来袭</p>
      <p class="state">状态：已完成</p>
      </div>
      </a>
    </li> -->
    </ul>

  </div><!-- content -->
  

  <jsp:include page="/inc/userfooter.jsp" />
  
</div><!-- page -->
<script type="text/javascript">
$(function(){
	//alert($("li[value=${t==null?'1':t}]").html())
	$(".cate>li[value=${t==null?'1':t}]").addClass("selected");
	
})


    function onBridgeReady(){
    	 WeixinJSBridge.call('hideOptionMenu');
    	}

    	if (typeof WeixinJSBridge == "undefined"){
    	    if( document.addEventListener ){
    	        document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
    	    }else if (document.attachEvent){
    	        document.attachEvent('WeixinJSBridgeReady', onBridgeReady); 
    	        document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
    	    }
    	}else{
    	    onBridgeReady();
    	}

</script>
</body>
</html>